<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('支付订单列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>渠道id：</p>
                                <input type="text" name="channelId"/>
                            </li>
                            <li>
                                <p>金额：</p>
                                <input type="text" name="amount"/>
                            </li>
                            <li>
                                <p>币种：</p>
                                <input type="text" name="currency"/>
                            </li>
                            <li>
                                <p>支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成：</p>
                                <select name="status">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>客户端ip：</p>
                                <input type="text" name="clientIp"/>
                            </li>
                            <li>
                                <p>设备：</p>
                                <input type="text" name="device"/>
                            </li>
                            <li>
                                <p>subject：</p>
                                <input type="text" name="subject"/>
                            </li>
                            <li>
                                <p>body：</p>
                                <input type="text" name="body"/>
                            </li>
                            <li>
                                <p>channelMchId：</p>
                                <input type="text" name="channelMchId"/>
                            </li>
                            <li>
                                <p>channelOrderNo：</p>
                                <input type="text" name="channelOrderNo"/>
                            </li>
                            <li>
                                <p>errCode：</p>
                                <input type="text" name="errCode"/>
                            </li>
                            <li>
                                <p>errMsg：</p>
                                <input type="text" name="errMsg"/>
                            </li>
                            <li>
                                <p>param1：</p>
                                <input type="text" name="param1"/>
                            </li>
                            <li>
                                <p>param2：</p>
                                <input type="text" name="param2"/>
                            </li>
                            <li>
                                <p>notify_url：</p>
                                <input type="text" name="notifyUrl"/>
                            </li>
                            <li>
                                <p>通知次数：</p>
                                <input type="text" name="notifyCount"/>
                            </li>
                            <li>
                                <p>最后一次通知时间：</p>
                                <input type="text" name="lastNotifyTime"/>
                            </li>
                            <li>
                                <p>订单失效时间：</p>
                                <input type="text" name="expireTime"/>
                            </li>
                            <li>
                                <p>订单支付成功时间：</p>
                                <input type="text" name="paySuccTime"/>
                            </li>
                            <li>
                                <p>租户ID：</p>
                                <input type="text" name="tenantId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:tradeorder:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:tradeorder:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:tradeorder:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:tradeorder:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:tradeorder:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:tradeorder:remove')}]];
        var prefix = ctx + "system/tradeorder";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "支付订单",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'orderId', 
                    title : '订单id',
                    visible: false
                },
                {
                    field : 'channelId', 
                    title : '渠道id'
                },
                {
                    field : 'amount', 
                    title : '金额'
                },
                {
                    field : 'currency', 
                    title : '币种'
                },
                {
                    field : 'status', 
                    title : '支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成'
                },
                {
                    field : 'clientIp', 
                    title : '客户端ip'
                },
                {
                    field : 'device', 
                    title : '设备'
                },
                {
                    field : 'subject', 
                    title : 'subject'
                },
                {
                    field : 'body', 
                    title : 'body'
                },
                {
                    field : 'extra', 
                    title : 'extra'
                },
                {
                    field : 'channelMchId', 
                    title : 'channelMchId'
                },
                {
                    field : 'channelOrderNo', 
                    title : 'channelOrderNo'
                },
                {
                    field : 'errCode', 
                    title : 'errCode'
                },
                {
                    field : 'errMsg', 
                    title : 'errMsg'
                },
                {
                    field : 'param1', 
                    title : 'param1'
                },
                {
                    field : 'param2', 
                    title : 'param2'
                },
                {
                    field : 'notifyUrl', 
                    title : 'notify_url'
                },
                {
                    field : 'notifyCount', 
                    title : '通知次数'
                },
                {
                    field : 'lastNotifyTime', 
                    title : '最后一次通知时间'
                },
                {
                    field : 'expireTime', 
                    title : '订单失效时间'
                },
                {
                    field : 'paySuccTime', 
                    title : '订单支付成功时间'
                },
                {
                    field : 'tenantId', 
                    title : '租户ID'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.orderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>